Skip to main content

All Questions

1vote
1answer
72views

Sed - replace a string with a character of another line

I am trying to write a script to reformat some text. pages: page1: gui-rows: 6 items: '6': material: CAT_SPAWN_EGG buy: 999999999 sell: -1 '7': ...
Pegoku's user avatar
3votes
2answers
341views

How to Replace Multiple Lines using Files on Termux

Assume I have many *.txt files on directory texts with the below contents. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam tincidunt mauris eu risus. Vestibulum auctor dapibus neque. ...
zakadmin's user avatar
0votes
1answer
2kviews

Change column width size in command output

I have the output from a command in which some text is hidden due to the column width size; are there any commands that can help display all of the output in that column? Currently, I use the grep ...
Sajesh Achari's user avatar
1vote
1answer
1kviews

Appending spaces to the rest of fixed length record in UNIX Script

I have the data for about 40 characters in the record of 250 length(FIXED). But I want to append the remaining 250-40=210 characters with SPACES. How do we do in UNIX Script?
ram kumar's user avatar
5votes
2answers
766views

What text editor supports positioning the cursor anywhere, even beyond the end of line?

I want an editor that can put the cursor anywhere in the text document, as if it were filled with spaces everywhere. This way I can place the cursor anywhere and type or paste right away, without the ...
WGRM's user avatar
  • 828
0votes
1answer
80views

Refining Saxon outuput

As a follow-up to this question, I now have the following command: set +H && java -cp saxon-he-10.5.jar net.sf.saxon.Query -config:saxon.xml -s:rss.xml -qs:'//item/link!substring-after(., &...
T145's user avatar
  • 213
0votes
5answers
121views

How can I simplify this?

Can you help me simplify this script? This works but I think that there is a easier way to do it, but I can't find it. The file: Car Brand:Mercedes | Country:Germany | Car Model:300 SL | Year:04-1960 ...
TsYn's user avatar
1vote
1answer
304views

Extract info in loops from specific column based on list of input

I have fileA and fileB. fileA is storing a list of names I wanted to extract from the second column of fileB. fileA: QW123 BH876 PR009 fileB: MJ194 PR009 100 PR009 IJ940 78 JG948 BH448 58 ...
web's user avatar
  • 193
1vote
2answers
323views

Detect odd characters in big text files

I need to check if my entire files contained only 4 characters; "A", "T", "G" and "C". I used to split the characters using sed and then grep -o and -v to ...
web's user avatar
  • 193
0votes
2answers
3kviews

busybox format date

I got a command which works perfectly on linux date -d @$(git log -1 --format=%at) '+%Y-%m-%d_%H-%M-%S' and now I'm trying to do the same formatting with busybox (v1.31.1), but it always fails with ...
daveN's user avatar
-3votes
2answers
58views

How to format columns using awk? [closed]

The file rectData.ssv contains: rectangle1;1;2 rectangle2;1;10 rect4;10;10 How could the following command be changed to align the columns: $ awk -F ";" '{ print "area of", $1,":", $2 * $3}' ...
Christian Binoya's user avatar
0votes
1answer
64views

Regex within awk from txt file with one line

I am currently working on a script to wipe hard drives. The first script is already working and checks if there are new hard drives available. If there is a new disk available it will list it in a ...
Ves's user avatar
  • 15
0votes
2answers
46views

Search last / and print next 2 characters and whole line

I have a file abc.log abc01 /opt/app/ggs/ggs/12.1.2.1.10/dirdat/fo027146 abc02 /opt/app/ggs/ggs/12.1.2.1.10/dirdat/fb027146 abc03 /opt/app/ggs/ggs/12.1.2.1.10/dirdat/fc027146 I ...
Moses's user avatar
0votes
1answer
1kviews

Get output of parts of PS in one single CSV line

I need to collect the CPU consumption of some processes that match a string but i need it on a single line separated by comman and was wondering if anyone knows if this is possible to do in one single ...
JCat67's user avatar
0votes
1answer
2kviews

How to write data to a csv file with comma in string values

I need to hit a database with basic select queries and write the result output in a file. using sqlcmd I execute the queries and write the results to the output csv file. While trying to open this ...
Venkat's user avatar

153050per page
close